package com.example.demo.project;

/**
 * 编辑人：刘凯
 */
// 活期存款利息计算
public class DemandDepositCalculator implements InterestCalculator {
    // 假设活期年利率为0.3%
    private static final double ANNUAL_INTEREST_RATE = 0.003;

    // 计算并返回活期利息
    @Override
    public double calculateInterest(double principal, int term) {
        return principal * ANNUAL_INTEREST_RATE * term / 12;
    }
}